<template>
	<view class="page_user">
		<view class="page_top"></view>
		<isLogin v-if="hasLogin" ref="hasLogin"></isLogin>
		<noLogin v-else></noLogin>
	</view>
</template>

<script>
	import { mapGetters } from "vuex";
	import noLogin from "./child/noLogin.vue";
	import isLogin from "./child/isLogin.vue"
	export default {
		data() {
			return {
				
			};
		},
		onShow() {
			let that = this;
			if(this.hasLogin){
				 let obj= that.$refs.hasLogin;
				 if(obj){
					 obj.getUserDetail()
				 }
			}
		},
		computed:{
			...mapGetters(["hasLogin"])
		},
		components:{
			isLogin,
			noLogin
		}
	}
</script>

<style>
	page{background: #F8F8F8}
</style>
<style scoped lang="scss">
	.page_top{width: 100%;height: var(--status-bar-height); background: #585cf7;}
</style>
